---
title: Internationalization
excerpt: Built-in support for translation and language detection.
weight: 3
---

```ts
// Get the `es` translation for a page by uuid.
const page = await drupal.getResource(
  "node--page",
  "07464e9f-9221-4a4f-b7f2-01389408e6c8",
  {
    locale: "es",
    defaultLocale: "en",
  }
)
```

```ts
// Fetch a collection of translated articles.
const articles = await drupal.getResourceCollection("node--article", {
  locale: "es",
  defaultLocale: "en",
})
```

```ts
// Fetch translated menu items.
const main = await drupal.getMenu("main", {
  locale: "es",
  defaultLocale: "en",
})
```
